Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post-command: Fix keyless signing. #7

Merged
merged 1 commit into from
Nov 28, 2023
Merged

post-command: Fix keyless signing. #7

merged 1 commit into from
Nov 28, 2023

Conversation

stephen-fox
Copy link
Contributor

The keyless signing feature (used to) rely on the COSIGN_EXPERIMENTAL environment variable being set to "1". The post-command shell script attempts to set this environment variable when executing cosign if the user specifies keyless signing.

The environment variable name was missing the underscore character. This caused keyless signing attempts to fail because the shell would interpret "COSIGN" as a shell command. [1]

This commit also removes some extra empty space.

References

  1. https://buildkite.com/metal-toolbox/governor-slack-addon/builds/106#018c122e-21ab-4488-b03a-0c5131595448

The keyless signing feature (used to) rely on the COSIGN_EXPERIMENTAL
environment variable being set to "1". The post-command shell script
attempts to set this environment variable when executing cosign if
the user specifies keyless signing.

The environment variable name was missing the underscore character.
This caused keyless signing attempts to fail because the shell would
interpret "COSIGN" as a shell command. [1]

This commit also removes some extra empty space.

References

1. https://buildkite.com/metal-toolbox/governor-slack-addon/builds/106#018c122e-21ab-4488-b03a-0c5131595448
@stephen-fox stephen-fox merged commit 04e3e24 into equinixmetal-buildkite:main Nov 28, 2023
4 checks passed
@stephen-fox stephen-fox deleted the fix-keyless-signing-env-typo branch November 28, 2023 14:10
@@ -58,15 +58,15 @@ cosign_keyless() {

rm out.sig || true

COSIGN EXPERIMENTAL=1 cosign sign \
COSIGN_EXPERIMENTAL=1 cosign sign \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephen-fox we do not need the COSIGN_EXPERIMENTAL=1 flag since cosign 2.0 release[1]

[1] https://blog.sigstore.dev/cosign-2-0-released/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants